<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" 
      lang="cn">
  <head>
    <meta charset="UTF-8">
    <title>应用新增</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    
     <link rel="shortcut icon" th:href="@{/favicon.ico}" type="image/x-icon" />
     <link rel="stylesheet" th:href="@{/jstree/themes/default/style.min.css}" />
    <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">
	<link rel="stylesheet" th:href="@{/css/xadmin.css}">
	<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{/js/pinyinUtil.js}"></script>
    <script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
    <script type="text/javascript" th:src="@{/js/common.js}"></script>
    <script type="text/javascript" th:src="@{/js/task-edit.js}"></script>
    <style>
     .layui-form-item{margin-bottom:5px;}
    </style>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script th:src="@{/js/html5shiv.min.js}"></script>
      <script th:src="@{/js/respond.min.js}"></script>
    <![endif]-->
  </head>
  
  <body>
    <div class="x-body">
	<input type="hidden" id="taskId" th:attr="value=${taskId}"/>
	 <input type="hidden" id="caseIds"/>
     <input type="hidden" id="deviceIds"/>
		<div class="layui-form">
  
		<div class="layui-form-item">
              <label for="taskName" class="layui-form-label" >
                  <span class="x-red">*</span>任务名称
              </label>
              <div class="layui-input-block">
                  <input type="text" id="taskName" autocomplete="off" class="layui-input" maxlength="15">
              </div>
		</div>
	
		<div class="layui-form-item">
              <label for="appId" class="layui-form-label">应用平台</label>
              <div class="layui-input-block">
                <select id="appId"> <option th:each="obj,iterStat:${applist}" th:attr="value=${obj.id}" th:text="${obj.appName}+'('+${obj.appType == 1?'ANDROID':'IOS'}+')'"></option></select>
              </div>
		</div>
     
		<div class="layui-form-item">
              <label for="testStatus" class="layui-form-label" >状态
              </label>
              <div class="layui-input-block">
                  <select id="testStatus">
				    <option value="1">草稿</option>
					<option value="2">测试中</option>
					<option value="3">完成</option>
				  </select>
              </div>
		</div>
		
		
		<div class="layui-form-item">
				<label class="layui-form-label">计划日期</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" id="planDate" placeholder="-" readonly>
				</div>
		</div>
	
		<div class="layui-form-item">
              <label for="testType" class="layui-form-label">
                  执行方式
              </label>
              <div class="layui-input-block">
                 <select id="testType">
				    <option value="1">全覆盖</option>
					<option value="2">快速</option>
				 </select>
              </div>
		</div>
		
		<div class="layui-form-item">
              <label for="tryNum" class="layui-form-label">
                  重试次数
              </label>
              <div class="layui-input-block">
                 <select id="tryNum">
				    <option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
				 </select>
              </div>
		</div>
	
	
		<div class="layui-form-item">
              <label for="scheduleType" class="layui-form-label">
                  执行计划
              </label>
              <div class="layui-input-block">
                 <select id="scheduleType" lay-filter="scheduleType">
				    <option value="1">暂无</option>
					<option value="2">立即执行</option>
					<option value="3">执行计划</option>
				 </select>
              </div>
		</div>
	
		<div class="layui-form-item" id="splan" style="display:none;">
              <label for="scheduleFrequency" class="layui-form-label">
                  执行计划
              </label>
              <div class="layui-input-inline">
                 <select id="scheduleFrequency" lay-filter="scheduleFrequency">
				    <option value="1">一次</option>
					<option value="2">每天</option>
				 </select>
              </div>
			  <div class="layui-input-inline">
                 <input type="text" class="layui-input" id="scheduleCron1" readonly/>
                 <input type="text" class="layui-input" id="scheduleCron" readonly style="display:none;"/>
              </div>
		</div>
	
		<div class="layui-form-item">
		    <input type="hidden" id="caseIds"/>
              <label for="testCase" class="layui-form-label">
                  执行案例
              </label>
			  <div class="layui-input-block">
				<button class="layui-btn"  id="caseadd-btn"><i class="layui-icon">&#xe654;</i>添加</button>
              </div>
		</div>
	
		<div class="layui-form-item">
			<div class="layui-collapse">
			 <div class="layui-colla-item">
				<h2 class="layui-colla-title">添加的案例</h2>
				<div class="layui-colla-content layui-show" >
				 <table class="layui-table">
                    <thead>
                    <tr>
                        <th>案例名称</th>
                        <th>平台</th>
                        <th>案例类型</th>
                    </thead>
                    <tbody id="casedg"></tbody>
                 </table>
			 </div>
			</div>
			</div>
		</div>
	
	
		<div class="layui-form-item">
		 <input type="hidden" id="deviceIds"/>
			<label for="testDevice" class="layui-form-label">执行设备</label>
			     <div class="layui-input-block">
					<button class="layui-btn"  id="deviceadd-btn"><i class="layui-icon">&#xe654;</i>添加</button>
				</div>
		</div>
	
	<div class="layui-form-item">
	    <div class="layui-collapse">
			<div class="layui-colla-item">
			<h2 class="layui-colla-title">添加的设备</h2>
			<div class="layui-colla-content layui-show">
			 <table class="layui-table">
		        <thead>
		          <tr>
		            <th>序列号</th>
		            <th>平台</th>
		            <th>品牌</th>
		            <th>型号</th>
		        </thead>
		        <tbody id="devicedg">
		        </tbody>
     		 </table>
			</div>
			</div>
		</div>
	</div>
	</div>
	 <div class="layui-form-item" style="text-align:center;margin-top:10px;">
		<button id="save-btn"  class="layui-btn"  type="button">
			 <i class="fa fa-floppy-o" style="margin-right:10px;"></i>确定
		</button>
  </div>
</div>        
</body>

</html>